'''
Created on 03.07.2013

'''

def nvl(x, v):
    return v if x is None else x

def date2str(d):
    return str(d.day) + '.' + str(d.month) + '.' + str(d.year)

def separate(s, sep):
    e = s.split(sep)
    if sep == ' ': x = ''
    else: x = sep
    r = []
    for i in e:
        i = i.trim()
        if i.len() > 0: r.append(i + x)
    return r
